package com.wxyzz.common.core.enums;

import java.security.Key;

public enum RedisKeyEnum {
    // 验证码 code:手机号
    KEY_CODE("code:%s", 300),
    // 验证码的发送次数 code:num:手机号
    KEY_CODE_NUM("code:num:%s", 600),
    // 签到的键 sign:年月:用户id
    KEY_SIGN("sign:%s:%s",31 * 24 * 3600);



    private String key;
    // key过期时间，单位秒
    private int timeout;

    public String getKey() {
        return key;
    }

    public int getTimeout() {
        return timeout;
    }

    RedisKeyEnum(String key, int timeout) {
        this.key = key;
        this.timeout = timeout;
    }
}
